<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"> </script>
</head>
<body>
    <div id="root">
        <h1></h1>
        <h1>hello. {{name}}</h1>
        <h1>指令语法</h1>
        <a v-bind:href="url">h3h</a>
    </div>
</body>
<script type="text/javascript">
    Vue.config.productionTip=false
    /*对象式
    const vm = new Vue({
        el:'#root',
        //el:document.getElementById('root')
        data:{
            name:'geng',
            address:'bj',
            url:'https://www.bilibili.com/video/BV1Zy4y1K7SH?p=7'
        }
    })
    console.log(vm)
    setTimeout(()=>{
        vm.$mount('#root')
    },1000)
    */   
   //函数式(组件)
   new Vue({
       el:'#root',
       data(){
           console.log(this)
           return{
               name:'哈哈哈',
               url:'https://www.bilibili.com/video/BV1Zy4y1K7SH?p=7'
           }
       }
   })

</script>
</html>